<!-- PRO-start -->
<div id="license-info" class="box mb-3">
  <% if controller_name == "dashboards" %>
  <div class="box-header">
    <h3 class="box-title clearfix">
      <%= t(".License") %>

      <span class="float-right">
        <%= link_to t(".Add License"), admin_licenses_path, class: "btn btn-sm" %>
      </span>
    </h3>
  </div>
  <% end %>
  <div class="box-row">
    <div class="mb-2">
      <% if !License.license? %>
        <div class="notice license-no"><%= t(".No license") %></div>
      <% else %>
        <table class="license-details table mb-2">
          <tr>
            <td style="width: 150px"><%= t(".Licensee name") %></td>
            <td data-field="name"><%= License.licensee["Name"] %></td>
          </tr>
          <tr>
            <td><%= t(".Licensee email") %></td>
            <td data-field="email"><%= License.licensee["Email"] %></td>
          </tr>
          <tr>
            <td><%= t(".Licensee company") %></td>
            <td data-field="company"><%= License.licensee["Company"] %></td>
          </tr>
          <% if License.trial? %>
          <tr>
            <td><%= t(".trial") %></td>
            <td data-field="trial"><%= t(".Trial yes") %></td>
          </tr>
          <% end %>
          <tr>
            <td><%= t(".issued_at") %></td>
            <td data-field="starts_at"><%= License.starts_at %></td>
          </tr>
          <tr>
            <td><%= t(".expires_at") %></td>
            <td data-field="expires_at"><%= License.expires_at %></td>
          </tr>
          <tr>
            <td><%= t(".features") %></td>
            <td data-field="features">
                <% License.license.features.each do |key| %>
                <%=  t(".feature.#{key}") %><br />
                <% end %>
            </td>
          </tr>
          <tr>
            <td><%= t(".users limit") %></td>
            <td data-field="users-limit">
              <%= License.users_limit %> <%= t(".users") %>

              <div class="text-gray"><%= t(".current actived") %> <%= License.current_active_users_count %>  <%= t(".users") %></div>
            </td>
          </tr>
        </table>

        <% if License.expired? %>
          <div class="notice notice-error license-expired"><%= t(".The license expired on expires_at", expires_at: License.expires_at) %></div>
        <% else %>
          <div class="notice license-will-expire"><%= t(".The license will expire on expires_at", expires_at: License.expires_at) %></div>
        <% end %>
      <% end %>
    </div>
  </div>
</div>
<!-- PRO-end -->